package OOday03;

public class DaNei {
    public static void main(String[] args) {
        ZongJian z=new ZongJian("张",22,8000);
        z.onWork(); z.peiXun(); z.book(); z.finQus(); z.finWork(); z.inWork(); z.price();
        JiangShing d =new JiangShing("大",28,8666);
        d.onWork();d.peiXun();d.book();d.finQus();d.finWork();d.inWork();d.price();
        JingLi s=new JingLi("时伟",26,10000);
        s.onWork();s.book();s.finWork();s.inWork();s.price();
        BanZhuRen h =new BanZhuRen("郝奶奶",50,10);
        h.onWork();h.finWork();h.inWork();h.price();

        ZongJian[]Z=new ZongJian[3];
        Z[0]=new ZongJian("李",20,3000);
        Z[1]=new ZongJian("马泽旭",19,99999);
        Z[2]=new ZongJian("刘",22,40);
        for (int i=0;i<Z.length;i++){
            System.out.println( Z[i].name);
            Z[i].price();
        }
    }
}
abstract class Infor{
    String name;
    int age;
    int price;
    Infor(String name,int age,int price){
        this.name=name;
        this.age=age;
        this.price=price;
    }
    void onWork(){
        System.out.println(name+"上班打卡了...");
    }
    void inWork(){
        System.out.println(name+"下班打卡了...");
    }
  abstract  void finWork();
    void price(){
        System.out.println(name+"工资为"+price+"元");
    }
}
interface Inte{
    void book();
}
interface Inte1 extends Inte{
    void finQus();
    void peiXun();
}
class ZongJian extends Infor implements Inte1{
    ZongJian(String name,int age,int price){
        super(name,age,price);
    }
    public void book() {
        System.out.println(name+"可以编辑书籍");
    }
    public void finQus(){
        System.out.println(name+"可以解决企业问题");
    }
    public void peiXun(){
        System.out.println(name+"可以培训员工");
    }
    void finWork(){
        System.out.println("完成工作了");
    }
}
class JiangShing extends Infor implements Inte1 {
    JiangShing (String name,int age, int price){
        super(name,age,price);
    }
    public void book(){
        System.out.println(name+"可以编辑书籍");
    }
    public void finQus(){
        System.out.println(name+"可以解决企业问题");
    }
    public void peiXun(){
        System.out.println(name+"可以培训员工");
    }
    void finWork(){
        System.out.println("完成工作了");
    }
}
class JingLi extends Infor implements Inte{
    JingLi(String name, int age,int price){
        super(name,age,price);
    }
    public void book(){
        System.out.println(name+"可以编辑书籍");
    }
    void finWork(){
        System.out.println("完成工作了");
    }
}
class BanZhuRen extends Infor{
    BanZhuRen(String name,int age,int price){
        super(name,age,price);
    }
    void finWork(){
        System.out.println("完成工作了");
    }
}
